import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    // {
    //   path: '/',
    //   name: 'home',
    //   component: HomeView
    // },
    // {
    //   path: '/about',
    //   name: 'about',
    //   component: () => import('../views/AboutView.vue')
    // },
    {
      path: '/',
      name: 'Login',
      component: () => import('../views/Login.vue')
    },
    {
      path: '/MainView',
      name: 'MainView',
      component: () => import('../views/MainView.vue'),
      children: [
        {
          //商品管理
          path: '/ProductManage',
          name: 'ProductManage',
          component: () => import('../views/ProductManage.vue')
        }, {
          //入库
          path: '/StorageView',
          name: 'StorageView',
          component: () => import('../views/StorageView.vue')
        }, {
          //入库添加
          path: '/StorageAdd',
          name: 'StorageAdd',
          component: () => import('../views/StorageAdd.vue')
        }, {
          //盘库
          path: '/InventoryView',
          name: 'InventoryView',
          component: () => import('../views/InventoryView.vue')
        },
        {
          path: '/BusinessPView',
          name: 'BusinessPView',
          component: () => import('../views/BasicInformation/BusinessPView.vue')
        },
        {
          path: '/StatisticsView',
          name: 'StatisticsView',
          component: () => import('../views/StatisticsView.vue')
        }, {
          path: '/MoveView',
          name: 'MoveView',
          component: () => import('../views/MoveView.vue')
        }, {
          path: '/InventoryRecords',
          name: 'InventoryRecords',
          component: () => import('../views/InventoryRecords.vue')
        },
        {
          path: '/BasicInformation/Brand',
          name: '/BasicInformation/Brand',
          component: () => import('../views/BasicInformation/Brand.vue')
        },
        {
          path: '/BasicInformation/Warehouse',
          name: '/BasicInformation/Warehouse',
          component: () => import('../views/BasicInformation/WareHouse.vue')
        },
        {
          path: '/OutboundSView',
          name: '/OutboundSView',
          component: () => import('../views/OutboundSView.vue')
        },
        {
          path: '/MoveTheLView',
          name: '/MoveTheLView',
          component: () => import('../views/MoveTheLView.vue')
        }, {
          path: '/DataScreen',
          name: '/DataScreen',
          component: () => import('../views/DataScreen.vue')
        }, {
          path: '/Homepage',
          name: '/Homepage',
          component: () => import('../views/Homepage.vue')
        },
        {
          path: '/basicInformation/Brand',
          name: '/Brand',
          component: () => import('../views/BasicInformation/Brand.vue')
        },
        {
          path: '/basicInformation/BusinessPView',
          name: '/Brand',
          component: () => import('../views/BasicInformation/BusinessPView.vue')
        },
        //
        {
          path: '/basicInformation/WareHouse',
          name: '/Brand',
          component: () => import('../views/BasicInformation/WareHouse.vue')
        },
        //商品管理
        {
          path: '/ProductManage',
          name: '/ProductManage',
          component: () => import('../views/ProductManage.vue')
        },
      ]
    }
  ]
})

export default router
